package com.nopay.dxdwphone.ui.ativity;

import android.os.Bundle;

import com.nopay.dxdwphone.base.BaseActivity;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.nopay.dxdwphone.databinding.ActivityCallLogExportBinding;

/**
 * 通话记录导出
 */
public class CallLogExportActivity extends BaseActivity<ActivityCallLogExportBinding> {

    @Override
    protected void init(Bundle savedInstanceState, Object... preData) {
        binding.rlRoot.setPadding(0, getStatusBarHeight(CallLogExportActivity.this), 0, 0);
        binding.ivBack.setOnClickListener(v -> mSwipeBackHelper.backward());

        String dateStr = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
        binding.tvStartDate.setText(dateStr);
        binding.tvEndDate.setText(dateStr);

        binding.layoutStartDate.setOnClickListener(view -> {
            // TODO 选择开始日期

        });

        binding.layoutEndDate.setOnClickListener(view -> {
            // TODO 选择结束日期

        });

        binding.btnStartExport.setOnClickListener(view -> {
            // TODO 开始导出
            boolean statusNo = binding.cbNo.isChecked();
            boolean statusYes = binding.cbYes.isChecked();

            String startDate = binding.tvStartDate.getText().toString();
            String endDate = binding.tvEndDate.getText().toString();


        });
    }

}
